
"设置ctags自动补全功能
"打开文件类型检测, 加了这句才可以用智能补全
""filetype plugin indent on

"关掉智能补全时的预览窗口
set completeopt=longest,menu
"ctags end

"语法支持
syn on   
"common conf{{	同样配置

"设置显示行号
set nu

"代码匹配
set showmatch


"设置帮助文档为中文
set helplang=cn

"高亮当前行
set cursorline 
"当前行高亮样式
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE guibg=NONE guifg=NONE 


"配色方案
"colorscheme my_distinguished
colorscheme lojzecolor
""colorscheme violet
"colorscheme solarized

"缩进尺寸
set noexpandtab
""set shiftwidth=2
set tabstop=2
"标准C/C++自动缩进
set cindent	"开启cindent
set ai    	"自动缩进

set hlsearch "搜索时高亮显示被找到的文本

"文件在Vim之外修改过，自动重新读入
set autoread
set backspace=2

"代码折叠
"set foldmethod=syntax

"编码格式
set encoding=utf-8
set termencoding=utf-8 
set fileencoding=utf-8 
set fileencodings=ucs-bom,utf-8,chinese,cp936
"}}   

""syntax enable

"pathogen是Vim用来管理插件的插件
"pathogen{
""call pathogen#infect()
"}

"设置vundle
set nocompatible              " be iMproved
filetype off                  " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#begin()

"Bundle 'Valloric/YouCompleteMe'

""call vundle#end()
"vundle 设置完毕

syntax on

"set background=dark

"let g:solarized_termcolors=255

"""""""""""""""""""""""""""""""""""

""设置括号自动补全！

""""""""""""""""""""""""""""""""""

:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
:inoremap " ""<ESC>i
:inoremap ' ''<ESC>i
":inoremap < <><ESC>i
":inoremap > <c-r>=ClosePair('>')<CR>

"""""""""""""""""""""""""""""""
 
"" winManager setting
 
"""""""""""""""""""""""""""""""

"设置界面分割
"let g:winManagerWindowLayout='TagList|FileExplorer'
let g:winManagerWindowLayout='FileExplorer|TagList'

"设置winmanager的宽度，默认为25
let g:winManagerWidth = 30

"定义打开关闭winmanager按键
nmap wm :WMToggle<CR>

"配置文件切换快捷键
nnoremap <silent> go :A<CR>

"配置粘贴模式的开关
set pastetoggle=<F10>

" 显示Tab符，使用一高亮竖线代替
set list
set listchars=tab:\|\ ,

"NeoBundle start
if has('vim_starting')
  if &compatible
    set nocompatible
  endif
  " Required:
  set runtimepath+=~/.vim/bundle/neobundle.vim/
endif

call neobundle#begin(expand('~/.vim/bundle/'))
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'toyamarinyon/vim-swift'
NeoBundle 'plasticboy/vim-markdown'
NeoBundle 'chemzqm/wxapp.vim'
NeoBundle 'othree/xml.vim'
call neobundle#end()
filetype plugin indent on
"NeoBundle end

" Tlist 
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1

"" cscopetag
if has("cscope")
	set csprg=/usr/local/bin/cscope
	set csto=0
	set cst
	set nocsverb
	" add any database in current directory
	if filereadable("cscope.out")
	    cs add cscope.out
	" else add database pointed to by environment
	elseif $CSCOPE_DB != ""
	    cs add $CSCOPE_DB
	endif
	set csverb
endif

" 按键映射
" Ctrl + _
""map <C-_> : cstag <C-R>=expand(“<cword>”)<CR><CR>
""
""nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR>
""nmap <C-_>g :cs find g <C-R>=expand("<cword>")<CR><CR>
""nmap <C-_>c :cs find c <C-R>=expand("<cword>")<CR><CR>
""nmap <C-_>t :cs find t <C-R>=expand("<cword>")<CR><CR>
""nmap <C-_>e :cs find e <C-R>=expand("<cword>")<CR><CR>
""nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
""nmap <C-_>i :cs find i <C-R>=expand("<cfile>")<CR><CR>
""nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
""
""" Ctrl + ]
""map g<C-]> :cs find 3 <C-R>=expand(“<cword>”)<CR><CR>
""
""" Ctrl + /
""map g<C-/> :cs find 0 <C-R>=expand(“<cword>”)<CR><CR>
""
""" Ctrl + Space
""nmap <C-Space>s :scs find s <C-R>=expand("<cword>")<CR><CR>
""nmap <C-Space>g :scs find g <C-R>=expand("<cword>")<CR><CR>
""nmap <C-Space>c :scs find c <C-R>=expand("<cword>")<CR><CR>
""nmap <C-Space>t :scs find t <C-R>=expand("<cword>")<CR><CR>
""nmap <C-Space>e :scs find e <C-R>=expand("<cword>")<CR><CR>
""nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
""nmap <C-Space>i :scs find i <C-R>=expand("<cfile>")<CR><CR>
""nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>









